
<%@ page import="SeedBank.Seed" %>
<!doctype html>
<html>
	<head>
		<meta name="layout" content="main">
		<g:set var="entityName" value="${message(code: 'seed.label', default: 'Seed')}" />
		<title><g:message code="default.list.label" args="[entityName]" /></title>
	</head>
	<body>
		<a href="#list-seed" class="skip" tabindex="-1"><g:message code="default.link.skip.label" default="Skip to content&hellip;"/></a>
		<div class="nav" role="navigation">
			<ul>
				<li><a class="home" href="${createLink(uri: '/')}"><g:message code="default.home.label"/></a></li>
				<li><g:link class="create" action="create"><g:message code="default.new.label" args="[entityName]" /></g:link></li>
				<li><g:link controller="seed" action="search">Search for a Seed</g:link></li>
				<g:if test="${session?.user}">
				<li><g:link controller="user" action="show" id="${session?.user?.id}"> My Profile</g:link><li>	
				</g:if>
				<g:if test="${session?.user?.admin}">
				<li><g:link controller="user" action="unlock">Unlock a User</g:link></li>
				</g:if>
			</ul>
		</div>
		<div id="list-seed" class="content scaffold-list" role="main">
			<h1><g:message code="default.list.label" args="[entityName]" /></h1>
			<g:if test="${flash.message}">
			<div class="message" role="status">${flash.message}</div>
			</g:if>
			<table>
				<thead>
					<tr>
					
						<g:sortableColumn property="commonName" title="${message(code: 'seed.commonName.label', default: 'Common Name')}" />
					
						<g:sortableColumn property="scientificName" title="${message(code: 'seed.scientificName.label', default: 'Scientific Name')}" />
										
						<g:sortableColumn property="hardinessZone" title="${message(code: 'seed.hardinessZone.label', default: 'Hardiness Zone')}" />
					
						<g:sortableColumn property="quantity" title="${message(code: 'seed.quantity.label', default: 'Quantity')}" />
						
						<g:sortableColumn property="price" title="${message(code: 'seed.price.label', default: 'Price')}" />
						
						<g:sortableColumn property="user" title="${message(code: 'seed.price.label', default: 'User')}" />
						
											
					</tr>
				</thead>
				<tbody>
				<g:each in="${seedInstanceList}" status="i" var="seedInstance">
					<tr class="${(i % 2) == 0 ? 'even' : 'odd'}">
					
						<td><g:link action="show" id="${seedInstance.id}">${fieldValue(bean: seedInstance, field: "commonName")}</g:link></td>
					
						<td>${fieldValue(bean: seedInstance, field: "scientificName")}</td>
					
						<td>${fieldValue(bean: seedInstance, field: "hardinessZone")}</td>
											
						<td>${fieldValue(bean: seedInstance, field: "quantity")}</td>
					
						<td>${fieldValue(bean: seedInstance, field: "price")}</td>
						
						<td><g:link controller="user" action="show" id="${seedInstance.user.id}"> ${seedInstance.user} </g:link></td>
						
										
					</tr>
				</g:each>
				</tbody>
			</table>
						
			
			<p> We are based at: </p>
			<iframe width="925" height="350" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src="https://maps.google.com/maps?f=q&amp;source=s_q&amp;hl=en&amp;geocode=&amp;q=Georgia+Tech,+Atlanta,+GA&amp;aq=2&amp;oq=georgia+tech&amp;sll=33.74718,-84.394226&amp;sspn=0.397376,0.449066&amp;ie=UTF8&amp;hq=Georgia+Tech,+Atlanta,+GA&amp;t=m&amp;ll=33.777328,-84.389484&amp;spn=0.018549,0.032015&amp;output=embed"></iframe><br /><small><a href="https://maps.google.com/maps?f=q&amp;source=embed&amp;hl=en&amp;geocode=&amp;q=Georgia+Tech,+Atlanta,+GA&amp;aq=2&amp;oq=georgia+tech&amp;sll=33.74718,-84.394226&amp;sspn=0.397376,0.449066&amp;ie=UTF8&amp;hq=Georgia+Tech,+Atlanta,+GA&amp;t=m&amp;ll=33.777328,-84.389484&amp;spn=0.018549,0.032015" style="color:#0000FF;text-align:left"></a></small>
			<div class="pagination">
				<g:paginate total="${seedInstanceTotal}" />
			</div>
		</div>
	</body>
</html>
